package com.huanong.controller;
/*
 *@Author:anran
 *@Date:2020/12/8
 *@Version 1.0
 */


import com.huanong.common.grace.result.GraceJSONResult;
import com.huanong.pojo.Types;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.*;

@Api(value = "产品类型信息",tags = {"产品类型信息"})
@RequestMapping("/types")
@CrossOrigin(origins = "*")
public interface TypesControllerApi {

    @ApiOperation(value = "查询产品类型接口",notes = "查询产品类型",httpMethod = "GET")
    @GetMapping("/queryTypes")
    GraceJSONResult query();

    @ApiOperation(value = "根据id查询产品类型接口",notes = "根据id查询产品类型",httpMethod = "GET")
    @GetMapping("/queryTypesById")
    GraceJSONResult queryById(@RequestParam("TsId") Integer TsId);

    @ApiOperation(value = "新增产品类型接口",notes = "新增产品类型",httpMethod = "POST")
    @PostMapping("/addTypes")
    GraceJSONResult add(@RequestBody Types types);

    @ApiOperation(value = "删除产品类型接口",notes = "删除产品类型",httpMethod = "GET")
    @GetMapping("/deleteTypes")
    GraceJSONResult delete(@RequestParam("TsId") Integer TsId);

    @ApiOperation(value = "更新产品类型接口",notes = "更新产品类型",httpMethod = "POST")
    @PostMapping("/updateTypes")
    GraceJSONResult update(@RequestBody Types types);
}
